package com.laex;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;

public class QuestionAlert extends Alert {
	
	public static final String NONE = "";
	public static final String CAT = "Clear All Categories ?";
	public static final String EXP = "Clear All Expenses ?";
	
	private Command yesCMD;
	private Command noCMD;
	private String current;
	
	public QuestionAlert(CommandListener handler, String type) {
		super("", type, null, AlertType.CONFIRMATION);

		yesCMD = new Command("Yes", Command.OK, 1);
		noCMD = new Command("No", Command.STOP, 2);
		
		this.addCommand(yesCMD);
		this.addCommand(noCMD);
		this.setCommandListener(handler);
		this.current = type;
	}
	
	public void setString(String str) {
		super.setString(str);
		this.current = str;
	}
	
	public Command getYesCMD() {
		return yesCMD;
	}
	
	public Command getNoCMD() {
		return noCMD;
	}
	
	public String getCurrent() {
		return current;
	}

}
